package com.ryan.smile;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;

import com.gfan.sdk.statitistics.GFAgent;
import com.waps.AdView;
import com.waps.AppConnect;

public abstract class BaseActivity extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        GFAgent.setReportUncaughtExceptions(true);
        AppConnect.getInstance(this);  
        
        doCreate(savedInstanceState);
        
        LinearLayout container =(LinearLayout)findViewById(R.id.AdLinearLayout);
        if(container!=null){
            new AdView(this,container).DisplayAd();
        }
    }
    
    protected abstract void doCreate(Bundle savedInstanceState) ;

    @Override
    protected void onResume() {
        super.onResume();
        GFAgent.onResume (this);
    }
    
    @Override
    protected void onPause() {
        super.onPause();
        GFAgent.onPause(this);
    }

}
